package com.zzl.car.mapper;

import com.zzl.car.entity.Illegal;
import com.zzl.car.entity.Notice;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IllegalMapper {

    /*
    * 生成违章记录
    * */
    public Integer insertIllegal(Illegal illegal);

    /*
    * 查询未处理的违章记录 的用户
    * */
    public List<String> getIllegalByState(Integer state);

    /*
    * 获取用户的所有违章记录
    * */
    public List<Illegal> getIllegalByUserTelephone(String telephone);

    /*
    * 获取用户不同状态的违章记录
    * */
    public List<Illegal> getIllegalByUserTelephoneAndState(@Param("userTelephone")String telephone,
                                                           @Param("state")Integer state);
    /*
    * 更新违章记录
    * */
    public Integer updateIllegal(Illegal illegal);

    /*
    * 根据id查询违章记录
    * */
    public Illegal getIllegalById(Integer id);

    /*
     获取所有违章信息
     */
    public List<Illegal> getAllIllegal(@Param("name")String name, @Param("state")Integer state);
}
